#! /usr/bin/expect

spawn telnet www.bing.com 80
expect "'^]'."
send "GET / HTTP/1.1\r"
send "Host: www.bing.com\r"
send "User-Agent: Firefox\r\r"
expect "</html>"
send "^]\r\r"
exit
